package com.es.disped.dao.oj.mapper;

import com.es.disped.dao.oj.model.Sim;
import com.es.disped.dao.oj.model.SimExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface SimMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table sim
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @SelectProvider(type=SimSqlProvider.class, method="countByExample")
    long countByExample(SimExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table sim
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @DeleteProvider(type=SimSqlProvider.class, method="deleteByExample")
    int deleteByExample(SimExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table sim
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @Delete({
        "delete from sim",
        "where s_id = #{sId,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer sId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table sim
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @Insert({
        "insert into sim (s_id, sim_s_id, ",
        "sim)",
        "values (#{sId,jdbcType=INTEGER}, #{simSId,jdbcType=INTEGER}, ",
        "#{sim,jdbcType=INTEGER})"
    })
    int insert(Sim record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table sim
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @InsertProvider(type=SimSqlProvider.class, method="insertSelective")
    int insertSelective(Sim record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table sim
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @SelectProvider(type=SimSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="s_id", property="sId", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="sim_s_id", property="simSId", jdbcType=JdbcType.INTEGER),
        @Result(column="sim", property="sim", jdbcType=JdbcType.INTEGER)
    })
    List<Sim> selectByExample(SimExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table sim
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @Select({
        "select",
        "s_id, sim_s_id, sim",
        "from sim",
        "where s_id = #{sId,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="s_id", property="sId", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="sim_s_id", property="simSId", jdbcType=JdbcType.INTEGER),
        @Result(column="sim", property="sim", jdbcType=JdbcType.INTEGER)
    })
    Sim selectByPrimaryKey(Integer sId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table sim
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @UpdateProvider(type=SimSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") Sim record, @Param("example") SimExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table sim
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @UpdateProvider(type=SimSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") Sim record, @Param("example") SimExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table sim
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @UpdateProvider(type=SimSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(Sim record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table sim
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @Update({
        "update sim",
        "set sim_s_id = #{simSId,jdbcType=INTEGER},",
          "sim = #{sim,jdbcType=INTEGER}",
        "where s_id = #{sId,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(Sim record);
}